<template>
  <view class="layout">
    <wd-navbar
      title="个人中心"
      placeholder
      :style="{ marginTop: `${systemBarHeight}px` }"
    />
    <me-for-student v-if="configStore.loginRole === '1'" />
    <me-for-teacher v-else />
  </view>
</template>

<script lang="ts" setup>
import { storeToRefs } from "pinia";
import { useConfigStore } from "@/store/config";
import meForStudent from "./components/meForStudent.vue";
import meForTeacher from "./components/meForTeacher.vue";

definePage({
  style: {
    navigationBarTitleText: "我的",
    navigationStyle: "custom",
  },
});
const configStore = useConfigStore();
const { systemBarHeight } = storeToRefs(configStore);

function goToBindStudent() {
  uni.navigateTo({
    url: `/pages-sub/student/selectSchool?showBack=true`,
  });
}
function gotoFace() {
  uni.navigateTo({
    url: `/pages/me/face`,
  });
}
</script>

<style lang="scss" scoped>
.layout {
  width: 100vw;
  height: 100vh;
  background: #fafafa;
}
.function-title {
  margin-top: 60px;
  font-size: 12px;
  color: #999999;
  margin-bottom: 20px;
}
.content {
  margin-left: 24px;
}
.pre-logo {
  width: 24px;
  height: 24px;
  margin-right: 20px;
}
.item {
  display: flex;
  align-items: center;
  height: 34px;
  margin-bottom: 11px;
}
</style>
